home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Development / Interfaces / QD3DGeometry.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-14  |  35.4 KB  |  1,301 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        QD3DGeometry.h                                             **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **                                                                          **
  7.  **     Purpose:     Generic geometry routines                                 **
  8.  **                                                                          **
  9.  **                                                                          **
  10.  **     Copyright (C) 1991-1995 Apple Computer, Inc. All rights reserved.     **    
  11.  **                                                                             **
  12.  **                                                                          **
  13.  *****************************************************************************/
  14. #ifndef QD3DGeometry_h
  15. #define QD3DGeometry_h
  16.  
  17. #ifndef QD3D_h
  18. #include <QD3D.h>
  19. #endif  /*  QD3D_h  */
  20.  
  21. #if PRAGMA_ONCE
  22.     #pragma once
  23. #endif
  24.  
  25. #if defined(__MWERKS__)
  26.     #pragma enumsalwaysint on
  27.     #pragma align_array_members off
  28.     #pragma options align=native
  29. #endif
  30.  
  31. #include <QD3DSet.h>
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif    /* __cplusplus */
  36.  
  37. /******************************************************************************
  38.  **                                                                             **
  39.  **                                Geometry Routines                             **
  40.  **                                                                             **
  41.  *****************************************************************************/
  42.  
  43. QD3D_EXPORT TQ3ObjectType Q3Geometry_GetType(
  44.     TQ3GeometryObject    geometry);
  45.  
  46. QD3D_EXPORT TQ3Status Q3Geometry_GetAttributeSet(
  47.     TQ3GeometryObject    geometry,
  48.     TQ3AttributeSet        *attributeSet);
  49.  
  50. QD3D_EXPORT TQ3Status Q3Geometry_SetAttributeSet(
  51.     TQ3GeometryObject    geometry,
  52.     TQ3AttributeSet        attributeSet);
  53.  
  54. QD3D_EXPORT TQ3Status Q3Geometry_Submit(
  55.     TQ3GeometryObject    geometry, 
  56.     TQ3ViewObject        view);
  57.  
  58.  
  59. /******************************************************************************
  60.  **                                                                             **
  61.  **                            Box    Data Structure Definitions                     **
  62.  **                                                                             **
  63.  *****************************************************************************/
  64.  
  65. typedef struct TQ3BoxData {
  66.     TQ3Point3D            origin;
  67.     TQ3Vector3D            orientation;
  68.     TQ3Vector3D            majorAxis;
  69.     TQ3Vector3D            minorAxis;
  70.     TQ3AttributeSet        *faceAttributeSet;    /* Ordering : Left, right,     */
  71.                                             /*              front, back,     */
  72.                                             /*              top, bottom    */
  73.     TQ3AttributeSet        boxAttributeSet;
  74. } TQ3BoxData;
  75.  
  76.  
  77. /******************************************************************************
  78.  **                                                                             **
  79.  **                                Box Routines                                 **
  80.  **                                                                             **
  81.  *****************************************************************************/
  82.  
  83. QD3D_EXPORT TQ3GeometryObject Q3Box_New(
  84.     const TQ3BoxData    *boxData);
  85.  
  86. QD3D_EXPORT TQ3Status Q3Box_Submit(
  87.     const TQ3BoxData    *boxData,
  88.     TQ3ViewObject        view);
  89.     
  90. QD3D_EXPORT TQ3Status Q3Box_SetData(
  91.     TQ3GeometryObject    box, 
  92.     const TQ3BoxData    *boxData);
  93.  
  94. QD3D_EXPORT TQ3Status Q3Box_GetData(
  95.     TQ3GeometryObject    box,
  96.     TQ3BoxData            *boxData);
  97.  
  98. QD3D_EXPORT TQ3Status Q3Box_EmptyData(
  99.     TQ3BoxData            *boxData);
  100.     
  101. QD3D_EXPORT TQ3Status Q3Box_SetOrigin(
  102.     TQ3GeometryObject    box,
  103.     const TQ3Point3D    *origin);
  104.  
  105. QD3D_EXPORT TQ3Status Q3Box_SetOrientation(
  106.     TQ3GeometryObject    box,
  107.     const TQ3Vector3D    *orientation);
  108.  
  109. QD3D_EXPORT TQ3Status Q3Box_SetMajorAxis(
  110.     TQ3GeometryObject    box,
  111.     const TQ3Vector3D    *majorAxis);
  112.  
  113. QD3D_EXPORT TQ3Status Q3Box_SetMinorAxis(
  114.     TQ3GeometryObject    box,
  115.     const TQ3Vector3D    *minorAxis);
  116.  
  117. QD3D_EXPORT TQ3Status Q3Box_GetOrigin(
  118.     TQ3GeometryObject    box,
  119.     TQ3Point3D            *origin);
  120.  
  121. QD3D_EXPORT TQ3Status Q3Box_GetOrientation(
  122.     TQ3GeometryObject    box,
  123.     TQ3Vector3D            *orientation);
  124.  
  125. QD3D_EXPORT TQ3Status Q3Box_GetMajorAxis(
  126.     TQ3GeometryObject    box,
  127.     TQ3Vector3D            *majorAxis);
  128.  
  129. QD3D_EXPORT TQ3Status Q3Box_GetMinorAxis(
  130.     TQ3GeometryObject    box,
  131.     TQ3Vector3D            *minorAxis);
  132.  
  133. QD3D_EXPORT TQ3Status Q3Box_GetFaceAttributeSet(
  134.     TQ3GeometryObject    box,
  135.     unsigned long        faceIndex,
  136.     TQ3AttributeSet        *faceAttributeSet);
  137.  
  138. QD3D_EXPORT TQ3Status Q3Box_SetFaceAttributeSet(
  139.     TQ3GeometryObject    box,
  140.     unsigned long        faceIndex,
  141.     TQ3AttributeSet        faceAttributeSet);
  142.  
  143.  
  144.  
  145. /******************************************************************************
  146.  **                                                                             **
  147.  **                    General Polygon Data Structure Definitions                 **
  148.  **                                                                             **
  149.  *****************************************************************************/
  150.  
  151. typedef enum TQ3GeneralPolygonShapeHint {
  152.     kQ3GeneralPolygonShapeHintComplex,
  153.     kQ3GeneralPolygonShapeHintConcave,
  154.     kQ3GeneralPolygonShapeHintConvex
  155. } TQ3GeneralPolygonShapeHint;
  156.  
  157. typedef struct TQ3GeneralPolygonContourData {
  158.     unsigned long                    numVertices;        
  159.     TQ3Vertex3D                        *vertices;            
  160. } TQ3GeneralPolygonContourData;
  161.  
  162. typedef struct TQ3GeneralPolygonData {
  163.     unsigned long                    numContours;
  164.     TQ3GeneralPolygonContourData    *contours;
  165.     TQ3GeneralPolygonShapeHint        shapeHint;
  166.     TQ3AttributeSet                    generalPolygonAttributeSet;
  167. } TQ3GeneralPolygonData;
  168.  
  169.  
  170. /******************************************************************************
  171.  **                                                                             **
  172.  **                            General polygon Routines                         **
  173.  **                                                                             **
  174.  *****************************************************************************/
  175.  
  176. QD3D_EXPORT TQ3GeometryObject Q3GeneralPolygon_New(
  177.     const TQ3GeneralPolygonData        *generalPolygonData);
  178.  
  179. QD3D_EXPORT TQ3Status Q3GeneralPolygon_Submit(
  180.      const TQ3GeneralPolygonData    *generalPolygonData,
  181.      TQ3ViewObject                    view);
  182.     
  183. QD3D_EXPORT TQ3Status Q3GeneralPolygon_SetData(
  184.     TQ3GeometryObject                generalPolygon, 
  185.     const TQ3GeneralPolygonData        *generalPolygonData);
  186.  
  187. QD3D_EXPORT TQ3Status Q3GeneralPolygon_GetData(
  188.     TQ3GeometryObject                polygon,
  189.     TQ3GeneralPolygonData            *generalPolygonData);
  190.  
  191. QD3D_EXPORT TQ3Status Q3GeneralPolygon_EmptyData(
  192.     TQ3GeneralPolygonData            *generalPolygonData);
  193.  
  194. QD3D_EXPORT TQ3Status Q3GeneralPolygon_GetVertexPosition(
  195.     TQ3GeometryObject                generalPolygon,
  196.     unsigned long                    contourIndex,
  197.     unsigned long                    pointIndex,
  198.     TQ3Point3D                        *position);
  199.  
  200. QD3D_EXPORT TQ3Status Q3GeneralPolygon_SetVertexPosition(
  201.     TQ3GeometryObject                generalPolygon,
  202.     unsigned long                    contourIndex,
  203.     unsigned long                    pointIndex,
  204.     const TQ3Point3D                *position);
  205.     
  206. QD3D_EXPORT TQ3Status Q3GeneralPolygon_GetVertexAttributeSet(
  207.     TQ3GeometryObject                generalPolygon,
  208.     unsigned long                    contourIndex,
  209.     unsigned long                    pointIndex,
  210.     TQ3AttributeSet                    *attributeSet);
  211.  
  212. QD3D_EXPORT TQ3Status Q3GeneralPolygon_SetVertexAttributeSet(
  213.     TQ3GeometryObject                generalPolygon,
  214.     unsigned long                    contourIndex,
  215.     unsigned long                    pointIndex,
  216.     TQ3AttributeSet                    attributeSet);
  217.  
  218. QD3D_EXPORT TQ3Status Q3GeneralPolygon_SetShapeHint(
  219.     TQ3GeometryObject                generalPolygon,
  220.     TQ3GeneralPolygonShapeHint        shapeHint);
  221.  
  222. QD3D_EXPORT TQ3Status Q3GeneralPolygon_GetShapeHint(
  223.     TQ3GeometryObject                generalPolygon,
  224.     TQ3GeneralPolygonShapeHint        *shapeHint);
  225.  
  226.  
  227. /******************************************************************************
  228.  **                                                                             **
  229.  **                        Line Data Structure Definitions                         **
  230.  **                                                                             **
  231.  *****************************************************************************/
  232.  
  233. typedef struct TQ3LineData {
  234.     TQ3Vertex3D            vertices[2];
  235.     TQ3AttributeSet        lineAttributeSet;
  236. } TQ3LineData;
  237.  
  238.  
  239. /******************************************************************************
  240.  **                                                                             **
  241.  **                            Line Routines                                     **
  242.  **                                                                             **
  243.  *****************************************************************************/
  244.  
  245. QD3D_EXPORT TQ3GeometryObject Q3Line_New(
  246.     const TQ3LineData         *lineData);
  247.  
  248. QD3D_EXPORT TQ3Status Q3Line_Submit(
  249.     const TQ3LineData         *lineData, 
  250.     TQ3ViewObject             view);
  251.  
  252. QD3D_EXPORT TQ3Status Q3Line_GetData(
  253.     TQ3GeometryObject         line,
  254.     TQ3LineData             *lineData);
  255.     
  256. QD3D_EXPORT TQ3Status Q3Line_SetData(
  257.     TQ3GeometryObject         line,
  258.     const TQ3LineData         *lineData);
  259.     
  260. QD3D_EXPORT TQ3Status Q3Line_GetVertexPosition(
  261.     TQ3GeometryObject        line,
  262.     unsigned long            index,
  263.     TQ3Point3D                *position);
  264.  
  265. QD3D_EXPORT TQ3Status Q3Line_SetVertexPosition(
  266.     TQ3GeometryObject        line,
  267.     unsigned long            index,
  268.     const TQ3Point3D        *position);
  269.  
  270. QD3D_EXPORT TQ3Status Q3Line_GetVertexAttributeSet(
  271.     TQ3GeometryObject        line,
  272.     unsigned long            index,
  273.     TQ3AttributeSet            *attributeSet);
  274.  
  275. QD3D_EXPORT TQ3Status Q3Line_SetVertexAttributeSet(
  276.     TQ3GeometryObject        line,
  277.     unsigned long            index,
  278.     TQ3AttributeSet            attributeSet);
  279.     
  280. QD3D_EXPORT TQ3Status Q3Line_EmptyData(
  281.     TQ3LineData             *lineData);
  282.  
  283.  
  284. /******************************************************************************
  285.  **                                                                             **
  286.  **                        Marker Data Structure Definitions                     **
  287.  **                                                                             **
  288.  *****************************************************************************/
  289.  
  290. typedef struct TQ3MarkerData {
  291.     TQ3Point3D            location;
  292.     long                xOffset;
  293.     long                yOffset;
  294.     TQ3Bitmap            bitmap;
  295.     TQ3AttributeSet        markerAttributeSet;
  296. } TQ3MarkerData;
  297.  
  298.  
  299. /******************************************************************************
  300.  **                                                                             **
  301.  **                                Marker Routines                                 **
  302.  **                                                                             **
  303.  *****************************************************************************/
  304.  
  305. QD3D_EXPORT TQ3GeometryObject Q3Marker_New(
  306.     const TQ3MarkerData        *markerData);
  307.  
  308. QD3D_EXPORT TQ3Status Q3Marker_Submit(
  309.     const TQ3MarkerData        *markerData,
  310.     TQ3ViewObject            view);
  311.     
  312. QD3D_EXPORT TQ3Status Q3Marker_SetData(
  313.     TQ3GeometryObject        geometry, 
  314.     const TQ3MarkerData        *markerData);
  315.  
  316. QD3D_EXPORT TQ3Status Q3Marker_GetData(
  317.     TQ3GeometryObject        geometry,
  318.     TQ3MarkerData            *markerData);
  319.  
  320. QD3D_EXPORT TQ3Status Q3Marker_EmptyData(
  321.     TQ3MarkerData            *markerData);
  322.     
  323. QD3D_EXPORT TQ3Status Q3Marker_GetPosition(
  324.     TQ3GeometryObject        marker,
  325.     TQ3Point3D                *location);
  326.  
  327. QD3D_EXPORT TQ3Status Q3Marker_SetPosition(
  328.     TQ3GeometryObject        marker,
  329.     const TQ3Point3D        *location);
  330.     
  331. QD3D_EXPORT TQ3Status Q3Marker_GetXOffset(
  332.     TQ3GeometryObject        marker,
  333.     long                    *xOffset);
  334.  
  335. QD3D_EXPORT TQ3Status Q3Marker_SetXOffset(
  336.     TQ3GeometryObject        marker,
  337.     long                    xOffset);
  338.  
  339. QD3D_EXPORT TQ3Status Q3Marker_GetYOffset(
  340.     TQ3GeometryObject        marker,
  341.     long                    *yOffset);
  342.  
  343. QD3D_EXPORT TQ3Status Q3Marker_SetYOffset(
  344.     TQ3GeometryObject        marker,
  345.     long                    yOffset);
  346.  
  347. QD3D_EXPORT TQ3Status Q3Marker_GetBitmap(
  348.     TQ3GeometryObject        marker,
  349.     TQ3Bitmap                *bitmap);
  350.  
  351. QD3D_EXPORT TQ3Status Q3Marker_SetBitmap(
  352.     TQ3GeometryObject        marker,
  353.     const TQ3Bitmap            *bitmap);
  354.  
  355.  
  356. /******************************************************************************
  357.  **                                                                             **
  358.  **                        Mesh Data Structure Definitions                         **
  359.  **                                                                             **
  360.  *****************************************************************************/
  361.  
  362. typedef struct TQ3MeshComponentPrivate     *TQ3MeshComponent;
  363. typedef struct TQ3MeshVertexPrivate     *TQ3MeshVertex;
  364. typedef struct TQ3MeshVertexPrivate     *TQ3MeshFace;
  365. typedef struct TQ3MeshEdgeRepPrivate     *TQ3MeshEdge;
  366. typedef struct TQ3MeshContourPrivate    *TQ3MeshContour;
  367.  
  368.  
  369. /******************************************************************************
  370.  **                                                                             **
  371.  **                            Mesh Routines                                      **
  372.  **                                                                             **
  373.  *****************************************************************************/
  374.  
  375. /*
  376.  *  Constructors
  377.  */
  378. QD3D_EXPORT TQ3GeometryObject Q3Mesh_New(
  379.     void);
  380.  
  381. QD3D_EXPORT TQ3MeshVertex Q3Mesh_VertexNew(
  382.     TQ3GeometryObject    mesh,
  383.     const TQ3Vertex3D    *vertex);
  384.             
  385. QD3D_EXPORT TQ3MeshFace Q3Mesh_FaceNew(
  386.     TQ3GeometryObject    mesh,
  387.     unsigned long        numVertices,
  388.     const TQ3MeshVertex    *vertices,
  389.     TQ3AttributeSet        attributeSet);
  390.  
  391. /*
  392.  *  Destructors
  393.  */
  394. QD3D_EXPORT TQ3Status Q3Mesh_VertexDelete( 
  395.     TQ3GeometryObject    mesh,
  396.     TQ3MeshVertex        vertex);
  397.  
  398. QD3D_EXPORT TQ3Status Q3Mesh_FaceDelete(
  399.     TQ3GeometryObject    mesh,
  400.     TQ3MeshFace            face);
  401.  
  402. /*
  403.  * Methods
  404.  */
  405. QD3D_EXPORT TQ3Status Q3Mesh_DelayUpdates(
  406.     TQ3GeometryObject    mesh);
  407.  
  408. QD3D_EXPORT TQ3Status Q3Mesh_ResumeUpdates(
  409.     TQ3GeometryObject    mesh);
  410.     
  411. QD3D_EXPORT TQ3MeshContour Q3Mesh_FaceToContour(
  412.     TQ3GeometryObject    mesh,
  413.     TQ3MeshFace            containerFace,
  414.     TQ3MeshFace            face);
  415.     
  416. QD3D_EXPORT TQ3MeshFace Q3Mesh_ContourToFace(
  417.     TQ3GeometryObject    mesh,
  418.     TQ3MeshContour        contour);
  419.  
  420. /*
  421.  * Mesh
  422.  */
  423. QD3D_EXPORT TQ3Status Q3Mesh_GetNumComponents(
  424.     TQ3GeometryObject    mesh,
  425.     unsigned long        *numComponents);
  426.  
  427. QD3D_EXPORT TQ3Status Q3Mesh_GetNumEdges(
  428.     TQ3GeometryObject    mesh,
  429.     unsigned long        *numEdges);
  430.  
  431. QD3D_EXPORT TQ3Status Q3Mesh_GetNumVertices(
  432.     TQ3GeometryObject    mesh,
  433.     unsigned long        *numVertices);
  434.  
  435. QD3D_EXPORT TQ3Status Q3Mesh_GetNumFaces(
  436.     TQ3GeometryObject    mesh,
  437.     unsigned long        *numFaces);
  438.  
  439. QD3D_EXPORT TQ3Status Q3Mesh_GetNumCorners(
  440.     TQ3GeometryObject    mesh,
  441.     unsigned long        *numCorners);
  442.  
  443. QD3D_EXPORT TQ3Status Q3Mesh_GetOrientable(
  444.     TQ3GeometryObject    mesh,
  445.     TQ3Boolean            *orientable);
  446.  
  447. /*
  448.  * Component
  449.  */
  450. QD3D_EXPORT TQ3Status Q3Mesh_GetComponentNumVertices(
  451.     TQ3GeometryObject    mesh,
  452.     TQ3MeshComponent    component,
  453.     unsigned long        *numVertices);
  454.  
  455. QD3D_EXPORT TQ3Status Q3Mesh_GetComponentNumEdges(
  456.     TQ3GeometryObject    mesh,
  457.     TQ3MeshComponent    component,
  458.     unsigned long        *numEdges);
  459.  
  460. QD3D_EXPORT TQ3Status Q3Mesh_GetComponentBoundingBox(
  461.     TQ3GeometryObject    mesh,
  462.     TQ3MeshComponent    component,
  463.     TQ3BoundingBox        *boundingBox);
  464.  
  465. QD3D_EXPORT TQ3Status Q3Mesh_GetComponentOrientable(
  466.     TQ3GeometryObject    mesh,
  467.     TQ3MeshComponent    component,
  468.     TQ3Boolean            *orientable);
  469.  
  470. /*
  471.  * Vertex
  472.  */
  473. QD3D_EXPORT TQ3Status Q3Mesh_GetVertexCoordinates(
  474.     TQ3GeometryObject    mesh,
  475.     TQ3MeshVertex        vertex,
  476.     TQ3Point3D            *coordinates);
  477.  
  478. QD3D_EXPORT TQ3Status Q3Mesh_GetVertexIndex(
  479.     TQ3GeometryObject    mesh,
  480.     TQ3MeshVertex        vertex,
  481.     unsigned long        *index);
  482.  
  483. QD3D_EXPORT TQ3Status Q3Mesh_GetVertexOnBoundary(
  484.     TQ3GeometryObject    mesh,
  485.     TQ3MeshVertex        vertex,
  486.     TQ3Boolean            *onBoundary);
  487.  
  488. QD3D_EXPORT TQ3Status Q3Mesh_GetVertexComponent(
  489.     TQ3GeometryObject    mesh,
  490.     TQ3MeshVertex        vertex,
  491.     TQ3MeshComponent    *component);
  492.  
  493. QD3D_EXPORT TQ3Status Q3Mesh_GetVertexAttributeSet(
  494.     TQ3GeometryObject    mesh,
  495.     TQ3MeshVertex        vertex,
  496.     TQ3AttributeSet        *attributeSet);
  497.  
  498.  
  499. QD3D_EXPORT TQ3Status Q3Mesh_SetVertexCoordinates(
  500.     TQ3GeometryObject    mesh,
  501.     TQ3MeshVertex        vertex,
  502.     const TQ3Point3D    *coordinates);
  503.  
  504. QD3D_EXPORT TQ3Status Q3Mesh_SetVertexAttributeSet(
  505.     TQ3GeometryObject    mesh,
  506.     TQ3MeshVertex        vertex,
  507.     TQ3AttributeSet        attributeSet);
  508.  
  509.  
  510. /*
  511.  * Face
  512.  */
  513. QD3D_EXPORT TQ3Status Q3Mesh_GetFaceNumVertices(
  514.     TQ3GeometryObject    mesh,
  515.     TQ3MeshFace            face,
  516.     unsigned long        *numVertices);
  517.  
  518. QD3D_EXPORT TQ3Status Q3Mesh_GetFacePlaneEquation(
  519.     TQ3GeometryObject    mesh,
  520.     TQ3MeshFace            face,
  521.     TQ3PlaneEquation    *planeEquation);
  522.  
  523. QD3D_EXPORT TQ3Status Q3Mesh_GetFaceNumContours(
  524.     TQ3GeometryObject    mesh,
  525.     TQ3MeshFace            face,
  526.     unsigned long        *numContours);
  527.  
  528. QD3D_EXPORT TQ3Status Q3Mesh_GetFaceIndex(
  529.     TQ3GeometryObject    mesh,
  530.     TQ3MeshFace            face,
  531.     unsigned long        *index);
  532.  
  533. QD3D_EXPORT TQ3Status Q3Mesh_GetFaceComponent(
  534.     TQ3GeometryObject    mesh,
  535.     TQ3MeshFace            face,
  536.     TQ3MeshComponent    *component);
  537.  
  538. QD3D_EXPORT TQ3Status Q3Mesh_GetFaceAttributeSet(
  539.     TQ3GeometryObject    mesh,
  540.     TQ3MeshFace            face,
  541.     TQ3AttributeSet        *attributeSet);
  542.  
  543.  
  544. QD3D_EXPORT TQ3Status Q3Mesh_SetFaceAttributeSet(
  545.     TQ3GeometryObject    mesh,
  546.     TQ3MeshFace            face,
  547.     TQ3AttributeSet        attributeSet);
  548.  
  549. /*
  550.  * Edge
  551.  */
  552. QD3D_EXPORT TQ3Status Q3Mesh_GetEdgeVertices(
  553.     TQ3GeometryObject    mesh,
  554.     TQ3MeshEdge            edge,
  555.     TQ3MeshVertex        *vertex1,
  556.     TQ3MeshVertex        *vertex2);
  557.  
  558. QD3D_EXPORT TQ3Status Q3Mesh_GetEdgeFaces(
  559.     TQ3GeometryObject    mesh,
  560.     TQ3MeshEdge            edge,
  561.     TQ3MeshFace            *face1,
  562.     TQ3MeshFace            *face2);
  563.  
  564. QD3D_EXPORT TQ3Status Q3Mesh_GetEdgeOnBoundary(
  565.     TQ3GeometryObject    mesh,
  566.     TQ3MeshEdge            edge,
  567.     TQ3Boolean            *onBoundary);
  568.  
  569. QD3D_EXPORT TQ3Status Q3Mesh_GetEdgeComponent(
  570.     TQ3GeometryObject    mesh,
  571.     TQ3MeshEdge            edge,
  572.     TQ3MeshComponent    *component);
  573.  
  574. QD3D_EXPORT TQ3Status Q3Mesh_GetEdgeAttributeSet(
  575.     TQ3GeometryObject    mesh,
  576.     TQ3MeshEdge            edge,
  577.     TQ3AttributeSet        *attributeSet);
  578.     
  579.  
  580. QD3D_EXPORT TQ3Status Q3Mesh_SetEdgeAttributeSet(
  581.     TQ3GeometryObject    mesh,
  582.     TQ3MeshEdge            edge,
  583.     TQ3AttributeSet        attributeSet);
  584.     
  585. /*
  586.  * Contour
  587.  */
  588. QD3D_EXPORT TQ3Status Q3Mesh_GetContourFace(
  589.     TQ3GeometryObject    mesh,
  590.     TQ3MeshContour        contour,
  591.     TQ3MeshFace            *face);
  592.  
  593. QD3D_EXPORT TQ3Status Q3Mesh_GetContourNumVertices(
  594.     TQ3GeometryObject    mesh,
  595.     TQ3MeshContour        contour,
  596.     unsigned long        *numVertices);
  597.  
  598. /*
  599.  * Corner
  600.  */
  601. QD3D_EXPORT TQ3Status Q3Mesh_GetCornerAttributeSet(
  602.     TQ3GeometryObject    mesh,
  603.     TQ3MeshVertex        vertex,
  604.     TQ3MeshFace            face,
  605.     TQ3AttributeSet        *attributeSet);
  606.  
  607. QD3D_EXPORT TQ3Status Q3Mesh_SetCornerAttributeSet(
  608.     TQ3GeometryObject    mesh,
  609.     TQ3MeshVertex        vertex,
  610.     TQ3MeshFace            face,
  611.     TQ3AttributeSet        attributeSet);
  612.  
  613.  
  614. /*
  615.  * Public Mesh Iterators
  616.  */
  617. typedef struct TQ3MeshIterator {
  618.     void                *var1;
  619.     void                *var2;
  620.     void                *var3;
  621.     struct {
  622.         void            *field1;
  623.         char            field2[4];
  624.     } var4;
  625. } TQ3MeshIterator;
  626.  
  627. QD3D_EXPORT TQ3MeshComponent Q3Mesh_FirstMeshComponent(
  628.     TQ3GeometryObject    mesh,
  629.     TQ3MeshIterator        *iterator);
  630.     
  631. QD3D_EXPORT TQ3MeshComponent Q3Mesh_NextMeshComponent(
  632.     TQ3MeshIterator        *iterator);
  633.  
  634. QD3D_EXPORT TQ3MeshVertex Q3Mesh_FirstComponentVertex(
  635.     TQ3MeshComponent    component,
  636.     TQ3MeshIterator        *iterator);
  637.     
  638. QD3D_EXPORT TQ3MeshVertex Q3Mesh_NextComponentVertex(
  639.     TQ3MeshIterator        *iterator);
  640.  
  641. QD3D_EXPORT TQ3MeshEdge Q3Mesh_FirstComponentEdge(
  642.     TQ3MeshComponent    component,
  643.     TQ3MeshIterator        *iterator);
  644.     
  645. QD3D_EXPORT TQ3MeshEdge Q3Mesh_NextComponentEdge(
  646.     TQ3MeshIterator        *iterator);
  647.  
  648. QD3D_EXPORT TQ3MeshVertex Q3Mesh_FirstMeshVertex(
  649.     TQ3GeometryObject    mesh,
  650.     TQ3MeshIterator        *iterator);
  651.  
  652. QD3D_EXPORT TQ3MeshVertex Q3Mesh_NextMeshVertex(
  653.     TQ3MeshIterator        *iterator);
  654.  
  655. QD3D_EXPORT TQ3MeshFace Q3Mesh_FirstMeshFace(
  656.     TQ3GeometryObject    mesh,
  657.     TQ3MeshIterator        *iterator);
  658.  
  659. QD3D_EXPORT TQ3MeshFace Q3Mesh_NextMeshFace(
  660.     TQ3MeshIterator        *iterator);
  661.  
  662. QD3D_EXPORT TQ3MeshEdge Q3Mesh_FirstMeshEdge(
  663.     TQ3GeometryObject    mesh,
  664.     TQ3MeshIterator        *iterator);
  665.  
  666. QD3D_EXPORT TQ3MeshEdge Q3Mesh_NextMeshEdge(
  667.     TQ3MeshIterator        *iterator);
  668.  
  669. QD3D_EXPORT TQ3MeshEdge Q3Mesh_FirstVertexEdge(
  670.     TQ3MeshVertex        vertex,
  671.     TQ3MeshIterator        *iterator);
  672.     
  673. QD3D_EXPORT TQ3MeshEdge Q3Mesh_NextVertexEdge(
  674.     TQ3MeshIterator        *iterator);
  675.  
  676. QD3D_EXPORT TQ3MeshVertex Q3Mesh_FirstVertexVertex(
  677.     TQ3MeshVertex        vertex,
  678.     TQ3MeshIterator        *iterator);
  679.     
  680. QD3D_EXPORT TQ3MeshVertex Q3Mesh_NextVertexVertex(
  681.     TQ3MeshIterator        *iterator);
  682.  
  683. QD3D_EXPORT TQ3MeshFace Q3Mesh_FirstVertexFace(
  684.     TQ3MeshVertex        vertex,
  685.     TQ3MeshIterator        *iterator);
  686.     
  687. QD3D_EXPORT TQ3MeshFace Q3Mesh_NextVertexFace(
  688.     TQ3MeshIterator        *iterator);
  689.  
  690. QD3D_EXPORT TQ3MeshEdge Q3Mesh_FirstFaceEdge(
  691.     TQ3MeshFace            face,
  692.     TQ3MeshIterator        *iterator);
  693.     
  694. QD3D_EXPORT TQ3MeshEdge Q3Mesh_NextFaceEdge(
  695.     TQ3MeshIterator        *iterator);
  696.  
  697. QD3D_EXPORT TQ3MeshVertex Q3Mesh_FirstFaceVertex(
  698.     TQ3MeshFace            face,
  699.     TQ3MeshIterator        *iterator);
  700.     
  701. QD3D_EXPORT TQ3MeshVertex Q3Mesh_NextFaceVertex(
  702.     TQ3MeshIterator        *iterator);
  703.  
  704. QD3D_EXPORT TQ3MeshFace Q3Mesh_FirstFaceFace(
  705.     TQ3MeshFace            face,
  706.     TQ3MeshIterator        *iterator);
  707.     
  708. QD3D_EXPORT TQ3MeshFace Q3Mesh_NextFaceFace(
  709.     TQ3MeshIterator        *iterator);
  710.  
  711. QD3D_EXPORT TQ3MeshContour Q3Mesh_FirstFaceContour(
  712.     TQ3MeshFace            face,
  713.     TQ3MeshIterator        *iterator);
  714.  
  715. QD3D_EXPORT TQ3MeshContour Q3Mesh_NextFaceContour(
  716.     TQ3MeshIterator        *iterator);
  717.  
  718. QD3D_EXPORT TQ3MeshEdge Q3Mesh_FirstContourEdge(
  719.     TQ3MeshContour        contour,
  720.     TQ3MeshIterator        *iterator);
  721.     
  722. QD3D_EXPORT TQ3MeshEdge Q3Mesh_NextContourEdge(
  723.     TQ3MeshIterator        *iterator);
  724.  
  725. QD3D_EXPORT TQ3MeshVertex Q3Mesh_FirstContourVertex(
  726.     TQ3MeshContour        contour,
  727.     TQ3MeshIterator        *iterator);
  728.     
  729. QD3D_EXPORT TQ3MeshVertex Q3Mesh_NextContourVertex(
  730.     TQ3MeshIterator        *iterator);
  731.  
  732. QD3D_EXPORT TQ3MeshFace Q3Mesh_FirstContourFace(
  733.     TQ3MeshContour        contour,
  734.     TQ3MeshIterator        *iterator);
  735.     
  736. QD3D_EXPORT TQ3MeshFace Q3Mesh_NextContourFace(
  737.     TQ3MeshIterator        *iterator);
  738.  
  739. #define    Q3ForEachMeshComponent(m,c,i)                                        \
  740.     for ( (c) = Q3Mesh_FirstMeshComponent((m),(i));                            \
  741.           (c);                                                                \
  742.           (c) = Q3Mesh_NextMeshComponent((i)) )
  743.  
  744. #define Q3ForEachComponentVertex(c,v,i)                                        \
  745.     for ( (v) = Q3Mesh_FirstComponentVertex((c),(i));                        \
  746.           (v);                                                                \
  747.           (v) = Q3Mesh_NextComponentVertex((i)) )
  748.           
  749. #define Q3ForEachComponentEdge(c,e,i)                                        \
  750.     for ( (e) = Q3Mesh_FirstComponentEdge((c),(i));                            \
  751.           (e);                                                                \
  752.           (e) = Q3Mesh_NextComponentEdge((i)) )
  753.  
  754. #define Q3ForEachMeshVertex(m,v,i)                                            \
  755.     for ( (v) = Q3Mesh_FirstMeshVertex((m),(i));                            \
  756.           (v);                                                                \
  757.           (v) = Q3Mesh_NextMeshVertex((i)) )
  758.  
  759. #define Q3ForEachMeshFace(m,f,i)                                            \
  760.     for ( (f) = Q3Mesh_FirstMeshFace((m),(i));                                \
  761.           (f);                                                                \
  762.           (f) = Q3Mesh_NextMeshFace((i)) )
  763.  
  764. #define Q3ForEachMeshEdge(m,e,i)                                            \
  765.     for ( (e) = Q3Mesh_FirstMeshEdge((m),(i));                                \
  766.           (e);                                                                \
  767.           (e) = Q3Mesh_NextMeshEdge((i)) )
  768.  
  769. #define Q3ForEachVertexEdge(v,e,i)                                            \
  770.     for ( (e) = Q3Mesh_FirstVertexEdge((v),(i));                            \
  771.           (e);                                                                \
  772.           (e) = Q3Mesh_NextVertexEdge((i)) )
  773.  
  774. #define Q3ForEachVertexVertex(v,n,i)                                        \
  775.     for ( (n) = Q3Mesh_FirstVertexVertex((v),(i));                            \
  776.           (n);                                                                \
  777.           (n) = Q3Mesh_NextVertexVertex((i)) )
  778.  
  779. #define Q3ForEachVertexFace(v,f,i)                                            \
  780.     for ( (f) = Q3Mesh_FirstVertexFace((v),(i));                            \
  781.           (f);                                                                \
  782.           (f) = Q3Mesh_NextVertexFace((i)) )
  783.  
  784. #define Q3ForEachFaceEdge(f,e,i)                                            \
  785.     for ( (e) = Q3Mesh_FirstFaceEdge((f),(i));                                \
  786.           (e);                                                                \
  787.           (e) = Q3Mesh_NextFaceEdge((i)) )
  788.  
  789. #define Q3ForEachFaceVertex(f,v,i)                                            \
  790.     for ( (v) = Q3Mesh_FirstFaceVertex((f),(i));                            \
  791.           (v);                                                                \
  792.           (v) = Q3Mesh_NextFaceVertex((i)) )
  793.     
  794. #define Q3ForEachFaceFace(f,n,i)                                            \
  795.     for ( (n) = Q3Mesh_FirstFaceFace((f),(i));                              \
  796.           (n);                                                                \
  797.           (n) = Q3Mesh_NextFaceFace((i)) )
  798.           
  799. #define Q3ForEachFaceContour(f,h,i)                                            \
  800.     for ( (h) = Q3Mesh_FirstFaceContour((f),(i));                            \
  801.           (h);                                                                \
  802.           (h) = Q3Mesh_NextFaceContour((i)) )
  803.  
  804. #define Q3ForEachContourEdge(h,e,i)                                            \
  805.     for ( (e) = Q3Mesh_FirstContourEdge((h),(i));                            \
  806.           (e);                                                                \
  807.           (e) = Q3Mesh_NextContourEdge((i)) )
  808.  
  809. #define Q3ForEachContourVertex(h,v,i)                                        \
  810.     for ( (v) = Q3Mesh_FirstContourVertex((h),(i));                            \
  811.           (v);                                                                \
  812.           (v) = Q3Mesh_NextContourVertex((i)) )
  813.  
  814. #define Q3ForEachContourFace(h,f,i)                                            \
  815.     for ( (f) = Q3Mesh_FirstContourFace((h),(i));                            \
  816.           (f);                                                                \
  817.           (f) = Q3Mesh_NextContourFace((i)) )
  818.  
  819.  
  820. /******************************************************************************
  821.  **                                                                             **
  822.  **                            Maximum order for NURB Curves                     **
  823.  **                                                                             **
  824.  *****************************************************************************/
  825.  
  826. #define kQ3NURBCurveMaxOrder    16
  827.  
  828.  
  829. /******************************************************************************
  830.  **                                                                             **
  831.  **                            Data Structure Definitions                         **
  832.  **                                                                             **
  833.  *****************************************************************************/
  834.  
  835. typedef struct TQ3NURBCurveData {
  836.      unsigned long            order;
  837.      unsigned long            numPoints;
  838.      TQ3RationalPoint4D        *controlPoints;
  839.      float                    *knots;
  840.      TQ3AttributeSet            curveAttributeSet;
  841. } TQ3NURBCurveData;
  842.  
  843.  
  844. /******************************************************************************
  845.  **                                                                             **
  846.  **                                NURB Curve Routines                             **
  847.  **                                                                             **
  848.  *****************************************************************************/
  849.  
  850. QD3D_EXPORT TQ3GeometryObject Q3NURBCurve_New(
  851.     const TQ3NURBCurveData        *curveData);
  852.  
  853. QD3D_EXPORT TQ3Status Q3NURBCurve_Submit(
  854.     const TQ3NURBCurveData        *curveData,
  855.     TQ3ViewObject                view);
  856.  
  857. QD3D_EXPORT TQ3Status Q3NURBCurve_SetData(
  858.     TQ3GeometryObject            curve, 
  859.     const TQ3NURBCurveData        *nurbCurveData);
  860.  
  861. QD3D_EXPORT TQ3Status Q3NURBCurve_GetData(
  862.     TQ3GeometryObject            curve,
  863.     TQ3NURBCurveData            *nurbCurveData); 
  864.  
  865. QD3D_EXPORT TQ3Status Q3NURBCurve_EmptyData(
  866.     TQ3NURBCurveData            *nurbCurveData);
  867.  
  868. QD3D_EXPORT TQ3Status Q3NURBCurve_SetControlPoint(
  869.     TQ3GeometryObject            curve,
  870.     unsigned long                pointIndex,
  871.     const TQ3RationalPoint4D    *point4D);
  872.     
  873. QD3D_EXPORT TQ3Status Q3NURBCurve_GetControlPoint(
  874.     TQ3GeometryObject            curve,
  875.     unsigned long                pointIndex,
  876.     TQ3RationalPoint4D            *point4D);
  877.  
  878. QD3D_EXPORT TQ3Status Q3NURBCurve_SetKnot(
  879.     TQ3GeometryObject            curve,
  880.     unsigned long                knotIndex,
  881.     float                        knotValue);
  882.  
  883. QD3D_EXPORT TQ3Status Q3NURBCurve_GetKnot(
  884.     TQ3GeometryObject            curve,
  885.     unsigned long                knotIndex,
  886.     float                        *knotValue);
  887.  
  888.  
  889. /******************************************************************************
  890.  **                                                                             **
  891.  **                            Maximum NURB Patch Order                         **
  892.  **                                                                             **
  893.  *****************************************************************************/
  894.  
  895. #define    kQ3NURBPatchMaxOrder    11
  896.  
  897. /******************************************************************************
  898.  **                                                                             **
  899.  **                        NURB Patch Data Structure Definitions                 **
  900.  **                                                                             **
  901.  *****************************************************************************/
  902.  
  903. typedef struct TQ3NURBPatchTrimCurveData {
  904.      unsigned long                    order;
  905.      unsigned long                    numPoints;
  906.      TQ3RationalPoint3D                *controlPoints;    
  907.     float                            *knots;    
  908. } TQ3NURBPatchTrimCurveData;
  909.  
  910. typedef struct TQ3NURBPatchTrimLoopData {
  911.     unsigned long                    numTrimCurves;
  912.     TQ3NURBPatchTrimCurveData        *trimCurves;
  913. } TQ3NURBPatchTrimLoopData;
  914.  
  915. typedef struct TQ3NURBPatchData {
  916.     unsigned long                        uOrder;
  917.     unsigned long                    vOrder;
  918.     unsigned long                    numRows;
  919.     unsigned long                        numColumns;                                  
  920.     TQ3RationalPoint4D                *controlPoints;
  921.     float                            *uKnots; 
  922.     float                            *vKnots;
  923.     unsigned long                    numTrimLoops;
  924.     TQ3NURBPatchTrimLoopData        *trimLoops;
  925.     TQ3AttributeSet                    patchAttributeSet;
  926. } TQ3NURBPatchData;
  927.  
  928.  
  929. /******************************************************************************
  930.  **                                                                             **
  931.  **                                NURB Patch Routines                             **
  932.  **                                                                             **
  933.  *****************************************************************************/
  934.  
  935. QD3D_EXPORT TQ3GeometryObject Q3NURBPatch_New(
  936.     const TQ3NURBPatchData        *nurbPatchData);
  937.  
  938. QD3D_EXPORT TQ3Status Q3NURBPatch_Submit(
  939.     const TQ3NURBPatchData        *nurbPatchData,
  940.     TQ3ViewObject                view);
  941.  
  942. QD3D_EXPORT TQ3Status Q3NURBPatch_SetData(
  943.     TQ3GeometryObject            nurbPatch, 
  944.     const TQ3NURBPatchData        *nurbPatchData);
  945.  
  946. QD3D_EXPORT TQ3Status Q3NURBPatch_GetData(
  947.     TQ3GeometryObject            nurbPatch, 
  948.     TQ3NURBPatchData            *nurbPatchData);
  949.  
  950. QD3D_EXPORT TQ3Status Q3NURBPatch_SetControlPoint(
  951.     TQ3GeometryObject            nurbPatch,
  952.     unsigned long                rowIndex,
  953.     unsigned long                columnIndex,
  954.     const TQ3RationalPoint4D    *point4D);
  955.  
  956. QD3D_EXPORT TQ3Status Q3NURBPatch_GetControlPoint(
  957.     TQ3GeometryObject            nurbPatch,
  958.     unsigned long                rowIndex,
  959.     unsigned long                columnIndex,
  960.     TQ3RationalPoint4D            *point4D);
  961.  
  962. QD3D_EXPORT TQ3Status Q3NURBPatch_SetUKnot(
  963.     TQ3GeometryObject            nurbPatch,
  964.     unsigned long                knotIndex,
  965.     float                        knotValue);
  966.  
  967. QD3D_EXPORT TQ3Status Q3NURBPatch_SetVKnot(
  968.     TQ3GeometryObject            nurbPatch,
  969.     unsigned long                knotIndex,
  970.     float                        knotValue);
  971.     
  972. QD3D_EXPORT TQ3Status Q3NURBPatch_GetUKnot(
  973.     TQ3GeometryObject            nurbPatch,
  974.     unsigned long                knotIndex,
  975.     float                        *knotValue);
  976.  
  977. QD3D_EXPORT TQ3Status Q3NURBPatch_GetVKnot(
  978.     TQ3GeometryObject            nurbPatch,
  979.     unsigned long                knotIndex,
  980.     float                        *knotValue);
  981.  
  982. QD3D_EXPORT TQ3Status Q3NURBPatch_EmptyData(
  983.     TQ3NURBPatchData            *nurbPatchData);
  984.  
  985.  
  986.  
  987. /******************************************************************************
  988.  **                                                                             **
  989.  **                        Point Data Structure Definitions                     **
  990.  **                                                                             **
  991.  *****************************************************************************/
  992.  
  993. typedef struct TQ3PointData {
  994.     TQ3Point3D            point;
  995.     TQ3AttributeSet        pointAttributeSet;
  996. } TQ3PointData;
  997.  
  998.  
  999. /******************************************************************************
  1000.  **                                                                             **
  1001.  **                                Point Routines                                 **
  1002.  **                                                                             **
  1003.  *****************************************************************************/
  1004.     
  1005. QD3D_EXPORT TQ3GeometryObject Q3Point_New(
  1006.     const TQ3PointData         *pointData);
  1007.  
  1008. QD3D_EXPORT TQ3Status Q3Point_Submit(
  1009.     const TQ3PointData         *pointData,
  1010.     TQ3ViewObject             view);
  1011.     
  1012. QD3D_EXPORT TQ3Status Q3Point_GetData(
  1013.     TQ3GeometryObject         point,
  1014.     TQ3PointData            *pointData);
  1015.     
  1016. QD3D_EXPORT TQ3Status Q3Point_SetData(
  1017.     TQ3GeometryObject         point,
  1018.     const TQ3PointData         *pointData);
  1019.     
  1020. QD3D_EXPORT TQ3Status Q3Point_EmptyData(
  1021.     TQ3PointData             *pointData);    
  1022.     
  1023. QD3D_EXPORT TQ3Status Q3Point_SetPosition(
  1024.     TQ3GeometryObject        point,
  1025.     const TQ3Point3D        *position);
  1026.     
  1027. QD3D_EXPORT TQ3Status Q3Point_GetPosition(
  1028.     TQ3GeometryObject        point,
  1029.     TQ3Point3D                *position);
  1030.  
  1031.  
  1032. /******************************************************************************
  1033.  **                                                                             **
  1034.  **                        Polygon Data Structure Definitions                     **
  1035.  **                                                                             **
  1036.  *****************************************************************************/
  1037.  
  1038. typedef struct TQ3PolygonData {
  1039.     unsigned long        numVertices;        
  1040.     TQ3Vertex3D            *vertices;            
  1041.     TQ3AttributeSet        polygonAttributeSet;
  1042. } TQ3PolygonData;
  1043.  
  1044.  
  1045. /******************************************************************************
  1046.  **                                                                             **
  1047.  **                            Polygon Routines                                 **
  1048.  **                                                                             **
  1049.  *****************************************************************************/
  1050.  
  1051. QD3D_EXPORT TQ3GeometryObject Q3Polygon_New(
  1052.     const TQ3PolygonData    *polygonData);
  1053.  
  1054. QD3D_EXPORT TQ3Status Q3Polygon_Submit(
  1055.     const TQ3PolygonData    *polygonData,
  1056.     TQ3ViewObject            view);
  1057.     
  1058. QD3D_EXPORT TQ3Status Q3Polygon_SetData(
  1059.     TQ3GeometryObject        polygon, 
  1060.     const TQ3PolygonData    *polygonData);
  1061.  
  1062. QD3D_EXPORT TQ3Status Q3Polygon_GetData(
  1063.     TQ3GeometryObject        polygon,
  1064.     TQ3PolygonData            *polygonData);
  1065.  
  1066. QD3D_EXPORT TQ3Status Q3Polygon_EmptyData(
  1067.     TQ3PolygonData            *polygonData);
  1068.  
  1069. QD3D_EXPORT TQ3Status Q3Polygon_GetVertexPosition(
  1070.     TQ3GeometryObject        polygon,
  1071.     unsigned long            index,
  1072.     TQ3Point3D                *point);
  1073.  
  1074. QD3D_EXPORT TQ3Status Q3Polygon_SetVertexPosition(
  1075.     TQ3GeometryObject        polygon,
  1076.     unsigned long            index,
  1077.     const TQ3Point3D        *point);
  1078.  
  1079. QD3D_EXPORT TQ3Status Q3Polygon_GetVertexAttributeSet(
  1080.     TQ3GeometryObject        polygon,
  1081.     unsigned long            index,
  1082.     TQ3AttributeSet            *attributeSet);
  1083.  
  1084. QD3D_EXPORT TQ3Status Q3Polygon_SetVertexAttributeSet(
  1085.     TQ3GeometryObject        polygon,
  1086.     unsigned long            index,
  1087.     TQ3AttributeSet            attributeSet);
  1088.  
  1089.  
  1090. /******************************************************************************
  1091.  **                                                                             **
  1092.  **                        PolyLine Data Structure Definitions                     **
  1093.  **                                                                             **
  1094.  *****************************************************************************/
  1095.  
  1096. typedef struct TQ3PolyLineData {
  1097.     unsigned long       numVertices;            
  1098.     TQ3Vertex3D            *vertices;                
  1099.     TQ3AttributeSet        *segmentAttributeSet;        
  1100.     TQ3AttributeSet        polyLineAttributeSet;        
  1101. } TQ3PolyLineData;
  1102.     
  1103.  
  1104. /******************************************************************************
  1105.  **                                                                             **
  1106.  **                            PolyLine Routines                                 **
  1107.  **                                                                             **
  1108.  *****************************************************************************/
  1109.  
  1110. QD3D_EXPORT TQ3GeometryObject Q3PolyLine_New(
  1111.     const TQ3PolyLineData    *polylineData);
  1112.  
  1113. QD3D_EXPORT TQ3Status Q3PolyLine_Submit(
  1114.     const TQ3PolyLineData    *polyLineData,
  1115.     TQ3ViewObject            view);
  1116.     
  1117. QD3D_EXPORT TQ3Status Q3PolyLine_SetData(
  1118.     TQ3GeometryObject        polyLine, 
  1119.     const TQ3PolyLineData    *polyLineData);
  1120.  
  1121. QD3D_EXPORT TQ3Status Q3PolyLine_GetData(
  1122.     TQ3GeometryObject        polyLine,
  1123.     TQ3PolyLineData            *polyLineData);
  1124.  
  1125. QD3D_EXPORT TQ3Status Q3PolyLine_EmptyData(
  1126.     TQ3PolyLineData            *polyLineData);
  1127.         
  1128. QD3D_EXPORT TQ3Status Q3PolyLine_GetVertexPosition(
  1129.     TQ3GeometryObject        polyLine,
  1130.     unsigned long            index,
  1131.     TQ3Point3D                *position);
  1132.  
  1133. QD3D_EXPORT TQ3Status Q3PolyLine_SetVertexPosition(
  1134.     TQ3GeometryObject        polyLine,
  1135.     unsigned long            index,
  1136.     const TQ3Point3D        *position);
  1137.  
  1138. QD3D_EXPORT TQ3Status Q3PolyLine_GetVertexAttributeSet(
  1139.     TQ3GeometryObject        polyLine,
  1140.     unsigned long            index,
  1141.     TQ3AttributeSet            *attributeSet);
  1142.  
  1143. QD3D_EXPORT TQ3Status Q3PolyLine_SetVertexAttributeSet(
  1144.     TQ3GeometryObject        polyLine,
  1145.     unsigned long            index,
  1146.     TQ3AttributeSet            attributeSet);
  1147.  
  1148. QD3D_EXPORT TQ3Status Q3PolyLine_GetSegmentAttributeSet(
  1149.     TQ3GeometryObject        polyLine,
  1150.     unsigned long            index,
  1151.     TQ3AttributeSet            *attributeSet);
  1152.  
  1153. QD3D_EXPORT TQ3Status Q3PolyLine_SetSegmentAttributeSet(
  1154.     TQ3GeometryObject        polyLine,
  1155.     unsigned long            index,
  1156.     TQ3AttributeSet            attributeSet);
  1157.  
  1158.  
  1159.  
  1160. /******************************************************************************
  1161.  **                                                                             **
  1162.  **                        Triangle Data Structure Definitions                     **
  1163.  **                                                                             **
  1164.  *****************************************************************************/
  1165.  
  1166. typedef struct TQ3TriangleData {
  1167.     TQ3Vertex3D            vertices[3];
  1168.     TQ3AttributeSet        triangleAttributeSet;
  1169. } TQ3TriangleData;
  1170.  
  1171.  
  1172. /******************************************************************************
  1173.  **                                                                             **
  1174.  **                            Triangle Routines                                 **
  1175.  **                                                                             **
  1176.  *****************************************************************************/
  1177.  
  1178. QD3D_EXPORT TQ3GeometryObject Q3Triangle_New(
  1179.     const TQ3TriangleData    *triangleData);
  1180.  
  1181. QD3D_EXPORT TQ3Status Q3Triangle_Submit(
  1182.     const TQ3TriangleData    *triangleData,
  1183.     TQ3ViewObject            view);
  1184.     
  1185. QD3D_EXPORT TQ3Status Q3Triangle_SetData(
  1186.     TQ3GeometryObject        triangle, 
  1187.     const TQ3TriangleData    *triangleData);
  1188.  
  1189. QD3D_EXPORT TQ3Status Q3Triangle_GetData(
  1190.     TQ3GeometryObject        triangle,
  1191.     TQ3TriangleData            *triangleData);
  1192.  
  1193. QD3D_EXPORT TQ3Status Q3Triangle_EmptyData(
  1194.     TQ3TriangleData            *triangleData);
  1195.  
  1196. QD3D_EXPORT TQ3Status Q3Triangle_GetVertexPosition(
  1197.     TQ3GeometryObject        triangle,
  1198.     unsigned long            index,
  1199.     TQ3Point3D                *point);
  1200.  
  1201. QD3D_EXPORT TQ3Status Q3Triangle_SetVertexPosition(
  1202.     TQ3GeometryObject        triangle,
  1203.     unsigned long            index,
  1204.     const TQ3Point3D        *point);
  1205.  
  1206. QD3D_EXPORT TQ3Status Q3Triangle_GetVertexAttributeSet(
  1207.     TQ3GeometryObject        triangle,
  1208.     unsigned long            index,
  1209.     TQ3AttributeSet            *attributeSet);
  1210.  
  1211. QD3D_EXPORT TQ3Status Q3Triangle_SetVertexAttributeSet(
  1212.     TQ3GeometryObject        triangle,
  1213.     unsigned long             index,
  1214.     TQ3AttributeSet             attributeSet);
  1215.  
  1216.  
  1217. /******************************************************************************
  1218.  **                                                                             **
  1219.  **                        TriGrid Data Structure Definitions                     **
  1220.  **                                                                             **
  1221.  *****************************************************************************/
  1222.  
  1223. typedef struct TQ3TriGridData {
  1224.     unsigned long        numRows;            
  1225.     unsigned long        numColumns;
  1226.     TQ3Vertex3D            *vertices;            
  1227.     TQ3AttributeSet        *facetAttributeSet;
  1228.     TQ3AttributeSet        triGridAttributeSet;
  1229. } TQ3TriGridData;
  1230.  
  1231.  
  1232. /******************************************************************************
  1233.  **                                                                             **
  1234.  **                                TriGrid Routines                             **
  1235.  **                                                                             **
  1236.  *****************************************************************************/
  1237.  
  1238. QD3D_EXPORT TQ3GeometryObject Q3TriGrid_New(
  1239.     const TQ3TriGridData    *triGridData);
  1240.  
  1241. QD3D_EXPORT TQ3Status Q3TriGrid_Submit(
  1242.     const TQ3TriGridData    *triGridData,
  1243.     TQ3ViewObject            view);
  1244.     
  1245. QD3D_EXPORT TQ3Status Q3TriGrid_SetData(
  1246.     TQ3GeometryObject        triGrid, 
  1247.     const TQ3TriGridData    *triGridData);
  1248.  
  1249. QD3D_EXPORT TQ3Status Q3TriGrid_GetData(
  1250.     TQ3GeometryObject        triGrid,
  1251.     TQ3TriGridData            *triGridData);
  1252.  
  1253. QD3D_EXPORT TQ3Status Q3TriGrid_EmptyData(
  1254.     TQ3TriGridData            *triGridData);
  1255.  
  1256. QD3D_EXPORT TQ3Status Q3TriGrid_GetVertexPosition(
  1257.     TQ3GeometryObject        triGrid,
  1258.     unsigned long            rowIndex,
  1259.     unsigned long            columnIndex,
  1260.     TQ3Point3D                *position);
  1261.  
  1262. QD3D_EXPORT TQ3Status Q3TriGrid_SetVertexPosition(
  1263.     TQ3GeometryObject        triGrid,
  1264.     unsigned long            rowIndex,
  1265.     unsigned long            columnIndex,
  1266.     const TQ3Point3D        *position);
  1267.  
  1268. QD3D_EXPORT TQ3Status Q3TriGrid_GetVertexAttributeSet(
  1269.     TQ3GeometryObject        triGrid,
  1270.     unsigned long            rowIndex,
  1271.     unsigned long            columnIndex,
  1272.     TQ3AttributeSet            *attributeSet);
  1273.  
  1274. QD3D_EXPORT TQ3Status Q3TriGrid_SetVertexAttributeSet(
  1275.     TQ3GeometryObject        triGrid,
  1276.     unsigned long            rowIndex,
  1277.     unsigned long            columnIndex,
  1278.     TQ3AttributeSet            attributeSet);
  1279.  
  1280. QD3D_EXPORT TQ3Status Q3TriGrid_GetFacetAttributeSet(
  1281.     TQ3GeometryObject        triGrid,
  1282.     unsigned long            faceIndex,
  1283.     TQ3AttributeSet            *facetAttributeSet);
  1284.  
  1285. QD3D_EXPORT TQ3Status Q3TriGrid_SetFacetAttributeSet(
  1286.     TQ3GeometryObject        triGrid,
  1287.     unsigned long            faceIndex,
  1288.     TQ3AttributeSet            facetAttributeSet);
  1289.  
  1290.  
  1291. #ifdef __cplusplus
  1292. }
  1293. #endif    /* __cplusplus */
  1294.  
  1295. #if defined(__MWERKS__)
  1296. #pragma options align=reset
  1297. #pragma enumsalwaysint reset
  1298. #endif
  1299.  
  1300. #endif  /* QD3DGeometry_h  */
  1301.